package com.mapper;

import com.domain.Comment;
import com.domain.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {
    @Select("SELECT * FROM t_user WHERE id =#{id}")
    public User findById(Integer id);

    @Insert("INSERT INTO t_user(user_name,pwd)" + "values (#{userName},#{pwd})")
    public int insertUser(User user);

    @Select("SELECT * FROM t_user WHERE user_name =#{userName} and pwd=#{pwd}")
    public User userLogin(User user);
}
